Optimal. Leaf size=41 \[ \frac {d \log (\sin (a+b x))}{b^2}-\frac {(c+d x) \cot (a+b x)}{b}-c x-\frac {d x^2}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3720, 3475} \[ \frac {d \log (\sin (a+b x))}{b^2}-\frac {(c+d x) \cot (a+b x)}{b}-c x-\frac {d x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3720
Rubi steps
\begin {align*} \int (c+d x) \cot ^2(a+b x) \, dx &=-\frac {(c+d x) \cot (a+b x)}{b}+\frac {d \int \cot (a+b x) \, dx}{b}-\int (c+d x) \, dx\\ &=-c x-\frac {d x^2}{2}-\frac {(c+d x) \cot (a+b x)}{b}+\frac {d \log (\sin (a+b x))}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.48, size = 82, normalized size = 2.00 \[ \frac {d \log (\sin (a+b x))}{b^2}-\frac {c \cot (a+b x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-\tan ^2(a+b x)\right )}{b}+\frac {d x \csc (a) \sin (b x) \csc (a+b x)}{b}-\frac {d x \csc (a) (b x \sin (a)+2 \cos (a))}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.59, size = 97, normalized size = 2.37 \[ -\frac {2 \, b d x - d \log \left (-\frac {1}{2} \, \cos \left (2 \, b x + 2 \, a\right ) + \frac {1}{2}\right ) \sin \left (2 \, b x + 2 \, a\right ) + 2 \, b c + 2 \, {\left (b d x + b c\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b^{2} d x^{2} + 2 \, b^{2} c x\right )} \sin \left (2 \, b x + 2 \, a\right )}{2 \, b^{2} \sin \left (2 \, b x + 2 \, a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.53, size = 1375, normalized size = 33.54 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 49, normalized size = 1.20 \[ -\frac {d \,x^{2}}{2}-c x -\frac {d \cot \left (b x +a \right ) x}{b}+\frac {d \ln \left (\sin \left (b x +a \right )\right )}{b^{2}}-\frac {c \cot \left (b x +a \right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.58, size = 292, normalized size = 7.12 \[ -\frac {2 \, {\left (b x + a + \frac {1}{\tan \left (b x + a\right )}\right )} c - \frac {2 \, {\left (b x + a + \frac {1}{\tan \left (b x + a\right )}\right )} a d}{b} + \frac {{\left ({\left (b x + a\right )}^{2} \cos \left (2 \, b x + 2 \, a\right )^{2} + {\left (b x + a\right )}^{2} \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, {\left (b x + a\right )}^{2} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b x + a\right )}^{2} - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 4 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d}{{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} b}}{2 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.57, size = 67, normalized size = 1.63 \[ -\frac {d\,x^2}{2}+\frac {d\,\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}-1\right )}{b^2}-\frac {\left (c+d\,x\right )\,2{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}-1\right )}-\frac {x\,\left (b\,c+d\,2{}\mathrm {i}\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.48, size = 104, normalized size = 2.54 \[ \begin {cases} \tilde {\infty } \left (c x + \frac {d x^{2}}{2}\right ) & \text {for}\: a = 0 \wedge b = 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \cot ^{2}{\relax (a )} & \text {for}\: b = 0 \\\tilde {\infty } \left (c x + \frac {d x^{2}}{2}\right ) & \text {for}\: a = - b x \\- c x - \frac {d x^{2}}{2} - \frac {c}{b \tan {\left (a + b x \right )}} - \frac {d x}{b \tan {\left (a + b x \right )}} - \frac {d \log {\left (\tan ^{2}{\left (a + b x \right )} + 1 \right )}}{2 b^{2}} + \frac {d \log {\left (\tan {\left (a + b x \right )} \right )}}{b^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________